home *** CD-ROM | disk | FTP | other *** search
-
-
- ' 9 5 C O N V E R T I B L E
-
- Program and Text by Fender Tucker -- Data Entry by Nina Kreigh
-
-
- It should come as no surprise to you that this program was inspired by
- a book. I imagine most computer programs are inspired by books because a
- computer is a lot like a book, only interactive. The book is a tiny
- paperback volume called "Pocket Ref" by Thomas J. Glover, published by
- Sequoia Publishing, Littletown CO, 1989. It's 480 pages of tiny print,
- listing practically every tidbit of numerical data known to man. I've seen
- more comprehensive compilations of knowledge before, but not in such a
- handy size.
-
- The Contents page lists topics such as Automotive, Carpentry,
- Chemistry, Electronics, Geology, Money, Plumbing, Tools, Weights and
- Measures, but the one that caught my eye was Conversions. It's 57 pages of
- every measure you've ever heard of, and the factor you need to multiply the
- quantity by to convert that measure to almost any other relevant measure.
- I highlighted every measure that MIGHT pop up during an average person's
- lifetime and sent the book off to Mary Kreigh, a LOADSTAR beta tester. Her
- daughter, Nina, volunteered to enter and check all of the data (no small
- task!) and the rest is history.
-
- We published a conversion program back on LS 128 #3 called 1989
- CONVERTIBLE. This then is our conversion program for the 90s, and I must
- say that I'm pleased with its speed and ease of use.
-
-
- THE PROGRAM SCREEN
- ------------------
-
- It's a one-screen program. Press H to see a Help window or Q to quit
- to LOADSTAR 128. Other than those two keys, all you need are the CRSR keys
- and the keypad for entering numbers. A joystick in port #2 will do the
- work of the CRSR keys, but you'll still need the keypad (or the regular
- number keys) to enter in values.
-
- There are four "windows" on the screen; two of them are one row tall
- and the other two are larger and can be scrolled. The two small windows
- hold the VALUES of the two measurements and the two big windows hold the
- MEASURE NAMES. To make things simple, let's call the windows (from left to
- right on the screen) A, B, C and D, with A and C being the one-row-tall
- "value" windows, and B and D being the scrolling MEASURE windows.
-
-
- CONVERTING
- ----------
-
- An example is probably the best way to describe the way the program
- works. Let's say you'd like to know how many liters there are in 3.7
- gallons of water. You'd move the red highlight bar (or "cursor") to the B
- window and scroll up or down until the highlight bar is on Gallons (US
- liquid). Then move the bar to the A window and enter 3.7 by simply typing
- 3.7 and pressing RETURN. The default value for Window A is 1. Now move
- the cursor to the D window and scroll up or down until you find Liters.
- Stop on Liters and your answer will miraculously appear in the C window.
-
- 3.7 Gallons (US Liquid) equals 14.00561 Liters
-
- As you can see, the program allows you to convert Gallons (US Liquid)
- to any of eleven different measures. Note that scientific notation may be
- used in Windows A and C. If you see
-
- 5.7e7
-
- this means 5.7 times 10 to the 7th power, or 57,000,000. A minus number
- after the "e" means the reciprocal. 3e-8 equals 1 divided by 300,000,000.
-
- NOTE: If you use huge numbers in Window A, there's a chance that the value
- in Window C may be so LONG that a digit of the exponent is cut off, making
- the answer off by at least a magnitude. My advice is to use reasonable
- numbers of six digits or less in Window A.
-
- '95 CONVERTIBLE also allows you to convert the "other" way. This means
- you can enter values into the C window and the amount in the A window will
- change accordingly. Since not every MEASURE in the D window is found in
- the list for the B window, this is the only way to convert from some
- MEASUREs in D to the MEASURE in B.
-
-
- CONVERSION FACTORS
- ------------------
-
- There are just about 100 MEASURES in Window B. Each of them has an
- average of about five or six MEASURES that it can be converted to. As you
- can see, Nina did a lot of work! In the book the value for Window C for
- each combination of MEASURES in B and D is given, assuming that the value
- in A is 1. For instance, the conversion factor when Feet is in B and
- Inches is in D is 12. One foot is assumed.
-
- This means you can add MEASURES of your own to the program, if you have
- a word processor that can load and save PETASCII PRG files. THE WRITE
- STUFF does this wonderfully; in fact it was what Nina and I used to make
- the file called "conv data".
-
- Here's how to add data to the file with TWS.
-
- (1) Boot up TWS and press CTRL then A. This puts you into the PETASCII
- mode.
-
- (2) Press CTRL then L to get the "Load" prompt. Delete the "-" that TWS
- automatically places on the input line and enter "conv data,p,r".
-
- (3) When the file is loaded, garbage will appear on the screen. Press
- CTRL then A and voila! The file is ready to be edited.
-
- (4) Let's say you want to add factors for converting British money
- (pounds) into shillings, pence and farthings. You need to know how many
- shillings in one pound, how many pence in a pound and how many farthings in
- a pound. I have no idea, but I assume you do. Look for lines that start
- with an asterisk. Scroll down to the right alphabetical spot in the list
- and insert "*British Pounds" directly before an asterisked line. The data
- doesn't have to be in alphabetical order, but it's better if it is, right?
-
- (5) On the three rows directly below *British Pounds enter the data for
- the three Measures like this:
-
- 20 Shillings
- 100 Pence These numbers may be totally wrong.
- 400 Farthings
-
- Note that there is ONE space between the number and the Measure on each
- line. Do not leave any blank lines in the file.
-
- (6) When done editing the file, save it as a TWS screen-code file. This
- isn't necessary, but it's handy to have a "source" file like this for the
- next time you feel like adding some measures. Then you can skip the first
- three steps above.
-
- (7) Go to the TWS Print Menu and set the left, right, top and bottom
- margins to 0. You can also do this by using reversed lm, rm, tm and bm
- codes in the text itself.
-
- (8) Print the file to disk with this filename: @0:conv data,p,w
- If there are fewer than 47 blocks free on the disk, you'll have to scratch
- "conv data" first then save. The "@0" (save with replace) syntax requires
- that there be as many blocks free on a disk as the size of the file being
- replaced.
-
- That's it! You're done and the program will now have British Pounds in
- the B window. I've DIMensioned the variables in line 140 in the program
- for 800 total lines of factors, and 110 different B window measures. If
- you get a "bad subscript error" you probably have added enough items to
- cause a problem. Simply increase the values in line 140 until you don't
- get the error.
-
- If you want to add extra conversions to measures that already have an
- asterisk before them, just insert the new conversion factor and measure
- below it on the list.
-
- To edit the program itself ("95 convertible") you MUST first run it and
- break out with STOP-RESTORE. Do not save the program without running it or
- CONTROL80's commands will be tokenized improperly and the program will no
- longer run. An easy way to save it is to
-
- goto10000
-
-
- WRAPUP
- ------
-
- That's all there is to it. It's a simple math program but it could
- come in handy some day. Not everybody has a pocket-sized POCKET REF on
- hand at all times. I want to thank Nina Kreigh for her excellent work.
- She went over those multi-digit numbers with a fine-toothed comb so you can
- be almost 100% certain they are as accurate as the Glover book is. And
- unlike $3000 Pentiums with Intel chips, your C-128 will handle the math
- accurately.
-
- FT
-
-